<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="/interceptor.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@page isELIgnored="false" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>休假审核</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function yes(){
		if(confirm("确定通过？")){
			document.getElementById("flag").value= 1;
			document.forms[0].submit();
		}
	}
	function no(){
		if(confirm("确定拒绝？")){
			document.getElementById("flag").value= 2;
			document.forms[0].submit();
		}
	}
	function back(){
		history.go(-1);
	}
</script>
</head>
<body>
<form id="myForm" name="myForm" action="vacationaudit" method="post">
	<input type="hidden" id="flag" name="flag" value=""/>
	<input type="hidden" id="state" name="state" value="${vacation.state }"/>
    <input type="hidden" id="id" name="id" value="${vacation.id}"/> 
	<div class="action">
		<div class="t">
			休假审核
		</div>
		<div class="pages">
			<table width="90%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="right" width="30%">申&nbsp;请&nbsp;人：</td>
                    <td align="left"><input type="text" name="name" value="${vacation.name}" readonly="readonly" id="name"/></td>
				</tr>
				<tr>
					<td align="right" width="30%">开始时间：</td>
                    <td align="left">
                    	<fmt:formatDate value="${vacation.startTime}" pattern="yyyy-MM-dd"/>
                    </td>
				</tr>
				<tr>
					<td align="right" width="30%">结束时间：</td>
                    <td align="left">
                    	<fmt:formatDate value="${vacation.endTime}" pattern="yyyy-MM-dd"/>
                   </td>
				</tr>
				<tr>
					<td align="right" width="30%">请假天数：</td>
                    <td align="left"><input type="text" name="days" value="${vacation.days}" readonly="readonly" id="totalday"/></td>
				</tr>
				<tr>
					<td align="right" width="30%">请假原因：</td>
                    <td align="left"><input type="text" name="reason" value="${vacation.reason}" readonly="readonly" id="reason"/></td>
				</tr>
                <tr>
					<td align="right" width="30%">审&nbsp;核&nbsp;人：</td>
                    <td align="left"><input type="text" name="checker" value="${vacation.checker}" readonly="readonly" id="applicant"/></td>
				</tr>
				<tr>
					<td align="center" colspan="2"><br/>
                    	<input type="button" value="审核通过" onclick="yes()" />
                        <input type="button" value="审核拒绝" onclick="no()" />
                        <input type="button" value="返回" onclick="back()" />
                    </td>
				</tr>
			</table>			
		</div>
	</div>
	</form>
</body>
</html>